package me.itsoo.artemis.framework.repository.mapper;

import me.itsoo.artemis.framework.repository.demo1.User;
import me.itsoo.artemis.framework.repository.mapper.condition.PageCondition;
import me.itsoo.artemis.framework.repository.mapper.condition.QueryCondition;

import java.util.List;

/**
 * DemoUserSqlMapper
 *
 * @author zxy
 * @version 0.0.1
 * @since 2023/5/11
 */
public class DemoUserSqlMapper extends AbstractSqlMapper<User> {

    public DemoUserSqlMapper() {
        super(User.class);
    }

    //!FIXME: 这里自定义扩展了 3 个查询
    //  1. 查总记录数
    //  2. 自定义分页查询
    //  3. 查询全部列表

    public List<User> selectPage(PageCondition condition) {
        return select(condition);
    }

    public List<User> selectAll() {
        return select((QueryCondition) null);
    }
}
